package Demo3;
interface IShape{    //接口，标准化    I开头
    public abstract void draw1();   //默认形式
    public int a = 10;
    public static int b = 2;
    public static final int c = 3;  //默认形式
    int D = 4;
    default void func(){
        System.out.println("接口中func被实现");
    }
}
class Rect implements IShape{   //类和接口连接
    @Override
    public void draw1() {
        System.out.println("画一个矩形");
    }
}
public class Test {
    public static void drawMap(IShape shape){
        shape.draw1();
        shape.func();
    }
    public static void main(String[] args) {
        drawMap(new Rect());
    }
}
